var klass=require('./banji')

klass.add('wx',['小明','小王','王宏'])

/*
D:\JsWorkSpace\nodejs\school>node index.js
Add teacher:wx
Add student:小明
Add student:小王
Add student:王宏
 */


 // 将整个学校导出去，传入多个班级
 exports.add=function(banjis){
     banjis.forEach(function(item,index) {

        var teacherName=item.teacherName;
        var students=item.students;

        klass.add(teacherName,students);
     });
 }